package com.buildupchao.shottingcard;

import com.buildupchao.shottingcard.runner.RideServerSocketAcceptor;

import java.io.IOException;
import java.net.Socket;

/**
 * @author buildupchao
 *         Date: 2019/3/15 19:29
 * @since JDK 1.8
 */
public class ShottingCardApplication {

    public static void main(String[] args) throws IOException {
        Thread acceptor = new Thread(new RideServerSocketAcceptor());
        acceptor.setName("acceptor");
        acceptor.start();

        for (int i = 0; i < 100; i++) {
            Socket socket = new Socket("localhost", 8888);
            System.out.printf("%d-[%s]\n", i, socket.toString());
        }
    }
}
